{% load render_table from django_tables2 %}
{% load helpers %}

<div class="card{% if card_class %} border-{{ card_class }} {% endif %} mb-3">
    {% if heading %}
        <div class="card-header{% if card_class %} bg-{{ card_class }}{% endif %}">
            <strong>{{ heading }}</strong>
        </div>
    {% endif %}
    <div class="table-responsive">
        {% render_table table table_inc_template|default:'inc/table.html' %}
    </div>
    {% if add_obj_url %}
        <div class="card-footer d-print-none">
            <div class="float-end">
                <a href="{{ add_obj_url }}" class="btn btn-primary btn-sm">
                    <span class="mdi mdi-plus-thick" aria-hidden="true"></span> Add {{ table.data.data.model|meta:"verbose_name" }}
                </a>
            </div>

            <div class="clearfix"></div>
        </div>
    {% endif %}
</div>
